Carbon


GetVRefNum

Header: Files.h Carbon status: Supported

Gets a volume reference number from a file reference number.

OSErr GetVRefNum (
    SInt16 fileRefNum, 
    SInt16 *vRefNum
);
fileRefNum

The file reference number of an open file.

vRefNum

On return, a pointer to the volume reference number of the volume containing the file specified by refNum.

function result

A result code.

DISCUSSION

If you also want to determine the directory ID of the specified file’s parent directory, call the PBGetFCBInfoSync or PBGetFCBInfoAsync functions.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)